<template>
  <div class="inventory">
    <Weapons
      :id="item.id"
      v-for="(item, index) in player.inventory"
      :key="item.id"
      :count="item.count"
      :pick="player.currentInventoryIndex == index"
    />
  </div>
</template>

<script>
import { mapState } from "vuex";
import Weapons from "@/components/player/Weapons.vue";

export default {
  components: { Weapons },
  computed: { ...mapState("map", ["player"]) },
};
</script>

<style scoped>
.inventory {
  display: flex;
  width: auto;
  height: 100%;
  gap: 0 10px;
}
</style>